import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Elixir here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Elixir extends Bonos
{
    /**
     * Act - do whatever the Elixir wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act() 
    {
        if(isTouching(Roca.class)){
         this.setLocation(getX(), 250);        
        }
        
        if(isTouching(Agujero.class)){
         this.setLocation(getX()-20, getY());        
        }
    }    
}
